<!--
  Generated template for the ProductdetailPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar color="primary" style="opacity: 0.8" no-border-bottom color="primary">
    <ion-title>商品详情</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <div text-center *ngIf="productDetail!=null">
    <img [src]="showImageUrl" *ngIf="productDetail.image_url!=null" >
    <img class="product_image" src="http://www.elss.com.cn/images/pic.jpg" *ngIf="productDetail.image_url==null"  >
    <h1 style="color: grey">{{productDetail.title}}</h1>
    <h2 style="color: red">￥{{productDetail.price}}</h2>
    <P style="font-size: 17px;">{{productDetail.desc}}</P>
  </div>

</ion-content>
<ion-footer>
  <ion-grid *ngIf="role == '1' " >
    <ion-row>
      <ion-col col-20 (click)="gotoemail()" >
        <button ion-button small clear icon-only>
          <ion-icon name="ios-mail-outline"></ion-icon>
          邮件
        </button>
      </ion-col>
      <ion-col col-20 (click)="gotocomments()" >
        <button ion-button small clear icon-only>
          <ion-icon name="ios-chatboxes-outline"></ion-icon>
          留言
        </button>
      </ion-col>
      <ion-col col-30 (click)="addToShopBus()" >
        <button ion-button small icon-only outline color="primary">
          <div style="padding-left: 10px;padding-right: 10px;">加入购物车</div>
        </button>
      </ion-col>
      <ion-col col-30 (click)="buyNow()" >
        <button ion-button small icon-only outline color="danger">
          <div style="padding-left: 10px;padding-right: 10px;">立刻购买</div>
        </button>
      </ion-col>
    </ion-row>
  </ion-grid>
  <ion-grid *ngIf="role == '2'">
    <ion-row>
      <ion-col col-50>
        <button ion-button block   (click)="shProd('1')" > 审核通过</button>
      </ion-col>
      <ion-col col-50>
        <button ion-button block   (click)="shProd('0')" >审核不通过</button>
      </ion-col>
    </ion-row>
  </ion-grid>

</ion-footer>
